<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    let obj = {
        name : 'tom',
        age : 18
    }
    let html = `
        <div>
            <span>${obj.name}</span>
            <span>${obj.age}</span>
        </div>
    `;
    console.log(html);
</script>

</html>